package com.example.controller;

import com.example.pojo.AjaxResult;
import com.example.service.OrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 指令下达Controller
 * @author Slience
 * @date 2025/7/24 10:42
 **/
@RestController
public class OrderController {

    @Resource
    private OrderService orderService;

    @GetMapping("/order")
    public AjaxResult<?> order(String order){
        Boolean res = orderService.executeOrder(order);
        return res ? AjaxResult.success("指令操作成功"):AjaxResult.fail("指令操作失败");
    }
}
